{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# TimeGPT Excel Add-in (Beta)\n",
    "\n",
    "## Installation\n",
    "\n",
    "Head to the [TimeGTP excel add-in page in Microsoft Appsource](https://appsource.microsoft.com/en-us/product/office/WA200006429?tab=Overview) and click on \"Get it now\"\n",
    "\n",
    "## Usage\n",
    "> 📘 Access token required\n",
    "> \n",
    "> The TimeGPT Excel Add-in requires an access token. Get your API Key on the [Nixtla Dashboard](http://dashboard.nixtla.io).\n",
    "\n",
    "## Support\n",
    "\n",
    "If you have questions or need support, please email [ops@nixtla.io](mailto:ops@nixtla.io).\n",
    "\n",
    "## How-to\n",
    "\n",
    "### Settings\n",
    "\n",
    "If this is your first time using Excel add-ins, find information on how to add Excel add-ins with your version of Excel. In the Office Add-ins Store, you'll search for \"TimeGPT\". \n",
    "\n",
    "Once you have installed the TimeGPT add-in, the add-in comes up in a sidebar task pane. \n",
    "* Read through the Welcome screen.\n",
    "* Click on the **'Get Started'** button.\n",
    "* The API URL is already set to: https://api.nixtla.io.\n",
    "* Copy your API key from [Nixtla Dashboard](http://dashboard.nixtla.io). Paste it into the box that say **API Key, Bearer**.\n",
    "* Click the gray arrow next to that box on the right. \n",
    "* You'll get to a screen with options for 'Forecast' and 'Anomaly Detection'.\n",
    "\n",
    "To access the settings later, click the gear icon in the top left.\n",
    "\n",
    "### Data Requirements\n",
    "\n",
    "* Put your dates in one column and your values in another.\n",
    "* Ensure your date format is recognized as a valid date by excel.\n",
    "* Ensure your values are recognized as valid number by excel.\n",
    "* All data inputs must exist in the same worksheet. The add-in does not support forecasting using multiple worksheets.\n",
    "* Do not include headers\n",
    "\n",
    "Example:\n",
    "\n",
    "| dates      | values  | \n",
    "| :------------- | :----- | \n",
    "| 12/1/16 0:00 | 72     | \n",
    "| 12/1/16 1:00   | 65.8   | \n",
    "| 12/1/16 2:00   | 59.99  | \n",
    "| 12/1/16 3:00   | 50.69  | \n",
    "| 12/1/16 4:00   | 52.58  | \n",
    "| 12/1/16 5:00   | 65.05  | \n",
    "| 12/1/16 6:00   | 80.4   | \n",
    "| 12/1/16 7:00   | 200    | \n",
    "| 12/1/16 8:00   | 200.63 | \n",
    "| 12/1/16 9:00   | 155.47 | \n",
    "| 12/1/16 10:00  | 150.91 | \n",
    "\n",
    "#### Forecasting\n",
    "\n",
    "Once you've configured your token and formatted your input data then you're all ready to forecast!\n",
    "\n",
    "With the add-in open, configure the forecasting settings by selecting the column for each input.\n",
    "\n",
    "* **Frequency** - The frequency of the data (hourly / daily / weekly / monthly)\n",
    "\n",
    "* **Horizon** - The forecasting horizon. This represents the number of time steps into the future that the forecast should predict.\n",
    "\n",
    "* **Dates Range** - The column and range of the timeseries timestamps. Must not include header data, and should be formatted as a range, e.g. A2:A145. \n",
    "\n",
    "* **Values Range** - The column and range of the timeseries values for each point in time. Must not include header data, and should be formatted as a range, e.g. B2:B145. \n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "When you're ready, click **Make Prediction** to generate the predicted values. The add-in will generate a plot and append the forecasted data to the end of the column of your existing data and highlight them in green. So, scroll to the end of your data to see the predicted values. \n",
    "\n",
    "\n",
    "\n",
    "#### Anomaly Detection\n",
    "\n",
    "The requirements are the same as for the forecasting functionality, so if you already tried it you are ready to run the anomaly detection one. Go to the main page in the add-in and select \"Anomaly Detection\", then choose your dates and values cell ranges and click on submit. We'll run the model and mark the anomalies cells in yellow while adding a third column for expected values with a green background.\n",
    "\n",
    "\n",
    "\n",
    "\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "python3",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
